<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>核算项目--职员修改</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/public.css">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/baseset/moneykind_input.css">
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/public.js"></script>
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/validate.js"></script>
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/date1.js"></script>

		<script type="text/javascript">
			function validate(){
				var candiateCode = document.getElementById("candiateCode");
				var cname = document.getElementById("cname");
				
				if (!isNotNull(candiateCode,'职员代码'))
					return false;
				if (!f_check_NumOrLett(candiateCode,'职员代码'))
					return false;
				if (!f_check_NumLength(candiateCode,'职员代码'))
					return false;
					
				if (!isNotNull(cname,'职员名称'))
					return false;
				if (!f_check_ZhOrNumOrLett(cname,'职员名称'))
					return false;
				if (!f_check_passwordLength(cname,'职员名称',1,25))
					return false;
				
				var mobile = document.getElementById("mobile");
				var email = document.getElementById("email");
				if(isNull(mobile,'电话号码'))
					;
				else if(!f_check_number(mobile,'电话号码'))
					return false ;
				
				if(isNull(email,'电子邮件')){
					;
				}else if(!(f_check_email(email,'电子邮件'))){
					return false;		
				}
				
				var idcardNo = document.getElementById("idcardNo");
				var openAccountBank = document.getElementById("openAccountBank");
				if(isNull(idcardNo,'身份证号')){
					;
				}else if(!(f_check_number(idcardNo,'身份证号'))){
					return false;		
				}
				
			}
		</script>
	</head>

	<body>
		<div id="info_all" style="width: 584px;">
			<div id="info_top">
				核算项目--职员修改
			</div>
			<div style="margin-top: 6px;">
				<s:form action="editCandiate.action" method="post"
					theme="simple" onsubmit="return validate()">
					<table
						style="padding: 0px; margin-top: 10px; background: #fbfbfb; color: #403040; margin-right: 6px;"
						align="right">
						<tr>
							<td width="50px">
								代码*
							</td>
							<td width="160px">
								<s:hidden name="can.candiate.candiateId" id="cid"></s:hidden>
								<s:textfield name="can.candiate.candiateCode" id="candiateCode"
									size="15"></s:textfield>
							</td>
							<td width="90px">
								电子邮件
							</td>
							<td width="200px">
								<s:textfield name="can.candiate.email" id="email" size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								名称*
							</td>
							<td>
								<s:textfield name="can.candiate.candiateName" id="cname"
									size="15"></s:textfield>
							</td>
							<td>
								职员类别
							</td>
							<td>
								<s:hidden
									name="can.candiate.PBaseAssistantmaterialCandiatecategoryId"
									id="candiateCategoryId"></s:hidden>
								<s:textfield name="can.candiateCategory.candiateCategoryName"
									id="candiateCategoryName" readonly="true" size="15"></s:textfield>
								<img src="images/kookup.gif" style="cursor: pointer"
									onclick="openWin('selectCandiateCategory.action','candiateCategory',340,500,0)">
							</td>
						</tr>

						<tr>
							<td>
								性别*
							</td>
							<td>
								<s:if test="can.candiate.gender == 0">
									<s:select list="#{'0':'男','1':'女'}" name="can.candiate.gender"
										cssStyle="width:100px;">
									</s:select>
								</s:if>
								<s:elseif test="can.candiate.gender == 1">
									<s:select list="#{'1':'女','0':'男'}" name="can.candiate.gender"
										cssStyle="width:100px;">
									</s:select>
								</s:elseif>
								<s:else>
									<s:select list="#{'0':'男','1':'女'}" name="can.candiate.gender"
										cssStyle="width:100px;">
									</s:select>
								</s:else>
							</td>
							<td>
								出生日期
							</td>
							<td>
								<s:textfield name="can.candiate.bithDate" size="15"
									id="bithDate" readonly="true" onclick="calendar.setHook(this)"></s:textfield>
							</td>
						</tr>

						<tr>
							<td>
								电话
							</td>
							<td>
								<s:textfield name="can.candiate.mobile" id="mobile" size="15"></s:textfield>
							</td>
							<td>
								文化程度
							</td>
							<td>
								<s:hidden name="can.candiate.PBaseAssistantmaterialCultureId"
									id="cultureId"></s:hidden>
								<s:textfield name="can.culture.cultureName" id="cultureName"
									readonly="true" size="15"></s:textfield>
								<img src="images/kookup.gif" style="cursor: pointer"
									onclick="openWin('selectCulture.action','culture',340,500,0)">
							</td>
						</tr>
						<tr>

						</tr>
						<tr>
							<td>
								职务
							</td>
							<td>
								<s:hidden name="can.candiate.PBaseAssistantmaterialDutyId"
									id="dutyId"></s:hidden>
								<s:textfield name="can.duty.dutyName" id="dutyName"
									readonly="true" size="15"></s:textfield>
								<img src="images/kookup.gif" style="cursor: pointer"
									onclick="openWin('selectDuty.action','duty',340,500,0)">
							</td>
							<td>
								身份证号
							</td>
							<td>
								<s:textfield name="can.candiate.idcardNo" id="idcardNo"
									size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								住址
							</td>
							<td>
								<s:textfield name="can.candiate.address" id="address" size="15"></s:textfield>
							</td>
							<td>
								入职日期
							</td>
							<td>
								<s:textfield name="can.candiate.enterDate" size="15"
									id="enterDate" readonly="true" onclick="calendar.setHook(this)"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								部门名称
							</td>
							<td>
								<s:hidden name="can.candiate.PBaseVerifyprojectDepartmentId"
									id="departmentId"></s:hidden>
								<s:textfield name="can.department.departmentName"
									readonly="true" id="departmentName" size="15"></s:textfield>
								<img src="images/kookup.gif" style="cursor: pointer"
									onclick="openWin('selectDepartment.action','department',970,500,1)">
							</td>
							<td>
								离职日期
							</td>
							<td>
								<s:textfield name="can.candiate.leaveDate" size="15"
									id="leaveDate" readonly="true" onclick="calendar.setHook(this)"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								备注
							</td>
							<td>
								<s:textfield name="can.candiate.memo" id="memo" size="15"></s:textfield>
							</td>
							<td>
								开户银行及账号
							</td>
							<td>
								<s:textfield name="can.candiate.openAccountBank"
									id="openAccountBank" size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								补贴人员
							</td>
							<td>
								<s:hidden name="can.candiate.allowance" id="candiateId"></s:hidden>
								<s:textfield name="can.allowance.candiateName" id="candiateName"
									readonly="true" size="15"></s:textfield>
								<img src="images/kookup.gif" style="cursor: pointer"
									onclick="openWin('selectCandiate.action','candiate',750,700,0)">
							</td>
							<td></td>
							<td>
							</td>

						</tr>

						<tr>
							<td></td>
							<td>
								<div style="margin-top: 8px; text-align: right;">
									<input type="submit" value="保存" onFocus="this.blur()"
										onMouseOver="this.className='btnover'"
										onmouseout="this.className='btnout'" class="btnsize" />
								</div>
							</td>
							<td>
								<div style="margin-top: 8px; text-align: center;">
									<input type="button" value="返回"
										onclick="javascript:history.go(-1)" onFocus="this.blur()"
										onMouseOver="this.className='btnover'"
										onmouseout="this.className='btnout'" class="btnsize" />
								</div>
							</td>
							<td></td>
						</tr>
					</table>
				</s:form>
			</div>
		</div>
	</body>
</html>
